#include "../../common/httplib.h"
#include <iostream>


int main()
{
   httplib::Server server;
   server.Get("/lch",[](const httplib::Request& req,httplib::Response& rsp) {
    std::cout << req.method << std::endl;
    std::cout << req.path << std::endl;
    for(auto it : req.headers) {
        std::cout << it.first << " " << it.second << std::endl;
    }

    std::string body = "<html><body><h1>Hello lch</h1></body></html>";
    rsp.set_content(body, "text/html");
    rsp.status = 200;
   
   });
   //启动服务器
   server.listen("0.0.0.0",9090);


    return 0;
}